window.onload=function(){
    var nav=document.getElementById('nav');
    var li=nav.getElementsByTagName('li');
    var right=document.getElementById('right');
    var content=right.getElementsByTagName('div');
    var landing=document.getElementById('landing');
    var edit=document.getElementsByClassName('edit');
    var person=document.getElementById('person');
    var information=document.getElementById('information');
    var ul=information.getElementsByTagName('ul');
    var ulinformation=document.getElementById('ulinformation');

    for (var i = 0; i < li.length; i++) {
        (function(i){
            li[i].onclick=function(){
                for (var j = 0; j< content.length; j++) {
                    content[j].className='content';
                    li[j].style.background='#fff';
                    li[j].style.color='#000';
                };
                content[i].className='#';
                li[i].style.background='#a54f55';
                li[i].style.color='#fff';
            }
        })(i);

    };


    person.onclick=function(){
        if(ulinformation.style.display=='block'){
            ulinformation.style.display='none'
        }else{
            ulinformation.style.display='block'
        }

    }

    var vm= new Vue({
        el:'#board',
        data:{
            person:[{
                qq:1748711164,
                text:'老师你好！'
            }]
        },

        methods:{
            submit: function(){
                this.person.push({
                    qq:this.nqq,
                    text:this.ntext
                });
                this.nqq='';
                this.ntext=''
            }
        }
    })





}